package com.zhf.fm.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: 曾鸿发
 * @create: 2021-11-22 13:30
 * @description：
 **/
public enum EDayType {
    work("工作日"),
    weekend("周末");


    private String value;
    EDayType(String value){
        this.value = value;
    }

    public String getValue() {
        return value;
    }


    private static Map<String,String> lis = null;
    public static EDayType getDayType(String value){
        if(lis==null){
            lis = new HashMap<>();
            lis.put("工作日","work");
            lis.put("周末","weekend");
        }
        String tpStr = lis.get(value);
        if(tpStr==null){
            return null;
        }else{
            return EDayType.valueOf(tpStr);
        }
    }
}
